#/bin/bash

scriptDir=`realpath -s $0`
scriptDir=${scriptDir%\/*}"/"

while read line ; do
    for number in $line ; do
        `bash $scriptDir/../getData.sh --m=$number --o=$PWD`
        diff=`diff $number.json approved/$number.json`
        if [[ $? == 0 ]] ; then 
            echo "$number was successfull";
            
            rm $number.json;
        else
            echo "$number FAILED";
            echo "";
            echo $diff
        fi
    done
done < "interestingNumbers.txt"
